home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
amiga
/
Translator.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
2KB
|
86 lines
(**************************************************************************
$RCSfile: Translator.mod $
Description: Interface to translator.library
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:13:14 $
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994-1995, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE [2] Translator;
IMPORT SYS := SYSTEM, Kernel, e := Exec;
(*
** $VER: translator.h 36.1 (13.12.90)
**
** Useful definitions for translator.library
*)
CONST
(* Translator error return codes *)
notUsed * = -1; (* This is an oft used system rc *)
noMem * = -2; (* Can't allocate memory *)
makeBad * = -4; (* Error in MakeLibrary call *)
(*-- Library Base variable --------------------------------------------*)
CONST
translatorName * = "translator.library";
VAR
base* : e.LibraryPtr;
(*-- Library Functions ------------------------------------------------*)
(*
** $VER: translator_protos.h 36.1 (7.11.90)
*)
PROCEDURE Translate* [base,-30]
( inputString [8] : ARRAY OF CHAR;
inputLength [0] : LONGINT;
VAR outputBuffer [9] : ARRAY OF CHAR;
bufferSize [1] : LONGINT )
: LONGINT;
(*-- Library Base variable --------------------------------------------*)
<*$LongVars-*>
(*-----------------------------------*)
PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
BEGIN (* CloseLib *)
IF base # NIL THEN e.CloseLibrary (base) END;
END CloseLib;
BEGIN
base := e.OpenLibrary (translatorName, e.libraryMinimum);
IF base = NIL THEN HALT (100) END;
Kernel.SetCleanup (CloseLib)
END Translator.